9cf510ffee68b2c6a16624b3cc2dc7ffbe6aa005,swagger/src/main/java/com/webcohesion/enunciate/modules/swagger/ConstraintsForMethod.java,ConstraintsForMethod,exec,#List#,36

Before Change


      }
      else if (decimalMax != null) {
        builder.append("\"maximum\" : ").append(decimalMax.value()).append(",");
        builder.append("\"exclusiveMaximum\" : ").append(!decimalMax.inclusive()).append(",");
      }

      Min min = el.getAnnotation(Min.class);
      DecimalMin decimalMin = el.getAnnotation(DecimalMin.class);
      if (min != null) {
        builder.append("\"minimum\" : ").append(min.value()).append(",");
      }
      else if (decimalMin != null) {
        builder.append("\"minimum\" : ").append(decimalMin.value()).append(",");
        builder.append("\"exclusiveMinimum\" : ").append(!decimalMin.inclusive()).append(",");
      }

      Size size = el.getAnnotation(Size.class);
      if (size != null) {
        if (array) {
          builder.append("\"maxItems\" : ").append(size.max()).append(",");
          builder.append("\"minItems\" : ").append(size.min()).append(",");
        }
        else {

After Change


      }
      else if (decimalMax != null) {
        constraints.put("maximum", String.valueOf(decimalMax.value()));
        constraints.put("exclusiveMaximum", String.valueOf(!decimalMax.inclusive()));
      }

      Min min = el.getAnnotation(Min.class);
      DecimalMin decimalMin = el.getAnnotation(DecimalMin.class);
      if (min != null) {
        constraints.put("minimum", String.valueOf(min.value()));
      }
      else if (decimalMin != null) {
        constraints.put("minimum", String.valueOf(decimalMin.value()));
        constraints.put("exclusiveMinimum", String.valueOf(!decimalMin.inclusive()));
      }

      Size size = el.getAnnotation(Size.class);
      if (size != null) {
        if (array) {
          constraints.put("maxItems", String.valueOf(size.max()));
          constraints.put("minItems", String.valueOf(size.min()));
        }
        else {
          constraints.put("maxLength", String.valueOf(size.max()));
          constraints.put("minLength", String.valueOf(size.min()));
        }
      }